﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;

namespace Delay
{
    public class ShrewdEyeItem : INotifyPropertyChanged
    {
        private string _title;
        public string Title
        {
            get
            {
                return _title;
            }
            set
            {
                if (_title != value)
                {
                    _title = value;
                    NotifyPropertyChanged("Title");
                }
            }
        }
        private string _content;
        public string Content
        {
            get
            {
                if (_content != null && _content.Length > 0)
                {
                    return _content.Replace("<br />", "\r\n").Replace("<br/ >", "\r\n").Replace("<br/>", "\r\n");
                }
                else
                    return _content;
            }
            set
            {
                if (_content != value)
                {
                    _content = value;
                    NotifyPropertyChanged("Content");
                }
            }
        }
        private string _picurl;
        public string Picurl
        {
            get
            {
                return _picurl;
            }
            set
            {
                if (_picurl != value)
                {
                    _picurl = value;
                    NotifyPropertyChanged("Picurl");
                }
            }
        }
        public string _pivotTitle;
        public string PivotTitle
        {
            get
            {
                return _pivotTitle;
            }
            set
            {
                if (_pivotTitle != value)
                {
                    _pivotTitle = value;
                    NotifyPropertyChanged("PivotTitle");
                }
            }
        }
        private string _topid;
        public string Topicid
        {
            get
            {
                return _topid;
            }
            set
            {
                if (_topid != value)
                {
                    _topid = value;
                    NotifyPropertyChanged("Topicid");
                }
            }
        }
        public string _readcount;
        public string Readcount
        {
            get
            {
                return _readcount;
            }
            set
            {
                if (_readcount != value)
                {
                    _readcount = value;
                    NotifyPropertyChanged("Readcount");
                }
            }
        }
        private string _replycount;
        public string Replycount
        {
            get
            {
                return _replycount;
            }
            set
            {
                if (_replycount != value)
                {
                    _replycount = value;
                    NotifyPropertyChanged("Replycount");
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private void NotifyPropertyChanged(String propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (null != handler)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        //

    }
}
